<template>
	<div class="gonggao_box">
		<van-collapse v-model="activeName" accordion>
			<template v-for="(item,index) in list">
				<van-collapse-item :title="item.title" :name="index" :is-link="false" :value="item.created_at">
					<div v-html="item.description"></div>
				</van-collapse-item>
			</template>
		</van-collapse>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				activeName: 0,
				list: [], //公告

			}
		},
		// 渲染之前
		created() {
			// get请求
			this.http.get("/api/notice/info")
				// 允许
				.then(res => {

					if(res.status_code == 200) {

						this.list = res.data;

					} else {
						this.$toast(res.message);
					}
				})
		},
		methods: {
			// 公告详情页
			tap(id) {
				this.$router.push("/gonggaoxiangqing/" + id)
			}
		}
	}
</script>

<style>
	@import url("../../assets/css/ttcp/chongzhi.css");
	.gonggao_box {
		background-color: #F2F2F2;
		height: 100vh;
	}
	/* 超出内容 */
	
	.gonggao_bottom1 {
		height: 1.4rem;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
		padding: 0.2rem 0.3rem;
		line-height: 0.38rem;
	}
</style>